﻿using BCCommon;
using BCCommon.TMS.FreightEnums;
using BCCommon.TMS.Order;
using BCCommon.TMS.Transport;
using BCDto.TMS.Packing.PackingConfig;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCDto.TMS.Order.Order
{
    /// <summary>
    /// 下单前订单运费计算
    /// </summary>
    public class OrderShippingCostRequestDto
    {
        #region 预约订单
        /// <summary>
        /// 预约订单
        /// </summary>
        [Display(Name = "预约订单")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public bool IsBook { get; set; }
        /// <summary>
        /// 预约时间
        /// </summary>
        [Display(Name = "预约时间")]
        public DateTime? BookTime { get; set; }
        #endregion
        /// <summary>
		/// 订单来源
		/// </summary>
		[Display(Name = "订单来源")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public OrderSourceType SourceType { get; set; }
        /// <summary>
        /// 物流类型
        /// </summary>
        [Display(Name = "物流类型")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public FreightType FreightType { get; set; }
        /// <summary>
        /// 发货人Id
        /// </summary>
        public long? UserId { get; set; }
        /// <summary>
        /// 车型Id
        /// </summary>
        [Display(Name = "车型Id")]
        public int? VehicleTypeId { get; set; }
        /// <summary>
        /// 车辆分类Id
        /// </summary>
        [Display(Name = "车辆分类Id")]
        public int? VehicleCategoryReferenceId { get; set; }
        /// <summary>
        /// 货物数量
        /// </summary>
        [Display(Name = "货物数量")]
        public int? GoodsNumber { get; set; }
        /// <summary>
        /// 货物重量
        /// </summary>
        [Display(Name = "货物重量")]
        public decimal? GoodsWeight { get; set; }
        /// <summary>
        /// 货物体积
        /// </summary>
        [Display(Name = "货物体积")]
        public decimal? GoodsVolume { get; set; }
        /// <summary>
        /// 货物长
        /// </summary>
        [Display(Name = "货物长")]
        public decimal? GoodsLength { get; set; }
        /// <summary>
        /// 货物宽
        /// </summary>
        [Display(Name = "货物宽")]
        public decimal? GoodsWidth { get; set; }
        /// <summary>
        /// 货物高
        /// </summary>
        [Display(Name = "货物高")]
        public decimal? GoodsHeight { get; set; }
        /// <summary>
        /// 发货地县编码
        /// </summary>
        [Display(Name = "发货地区县编码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.NUMBER, ErrorMessage = "{0} 应全部是数字")]
        public string CountyCode { get; set; }
        /// <summary>
        /// 发货地地址
        /// </summary>
        [Display(Name = "发货地区县编码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string Address { get; set; }
        /// <summary>
		/// 发货地经度
		/// </summary>		
        [Display(Name = "发货地经度")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public double Longitude { get; set; }
        /// <summary>
        /// 发货地纬度
        /// </summary>		
        [Display(Name = "发货地纬度")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public double Latitude { get; set; }
        /// <summary>
		/// 保价服务
		/// </summary>
		[Display(Name = "保价服务")]
        public bool IsInsuredPrice { get; set; }
        /// <summary>
        /// 代收货款服务
        /// </summary>
        [Display(Name = "代收货款服务")]
        public bool IsCod { get; set; }

        #region 打赏金额
        /// <summary>
        /// 打赏金额
        /// </summary>		
        [Display(Name = "打赏金额")]
        public decimal? GratuityAmount { get; set; }
        #endregion

        #region 保价服务详细信息
        /// <summary>
        /// 保价配置Id
        /// </summary>
        [Display(Name = "保价配置Id")]
        public int? InsuredConfigId { get; set; }
        /// <summary>
        /// 保价货物价值凭证
        /// </summary>
        [Display(Name = "保价货物价值凭证")]
        public string InsuredPriceCertificates { get; set; }
        /// <summary>
        /// 保价金额(货物保价金额)
        /// </summary>
        [Display(Name = "保价金额(货物保价金额)")]
        public decimal? InsuredPrice { get; set; }
        #endregion

        #region 代收货款服务
        /// <summary>
        /// 代收货款服务
        /// </summary>
        [Display(Name = "代收货款服务")]
        public decimal? CodCost { get; set; }
        #endregion

        #region 优惠券信息
        /// <summary>
		/// 优惠券Id
		/// </summary>
        [Display(Name = "优惠券Id")]
        public long? CouponId { get; set; }
        #endregion

        /// <summary>
        /// 运输业务类型
        /// </summary>
        [Display(Name = "运输业务类型")]
        public TransportBusinessType TransportBusinessType { get; set; }
        /// <summary>
        /// 套餐业务类型
        /// </summary>
        [Display(Name = "套餐业务类型")]
        public VehicleSuiteBusinessType SuiteBusinessType { get; set; }
        /// <summary>
        /// 跑腿业务类型
        /// </summary>
        [Display(Name = "跑腿业务类型")]
        public OrderRunErrandsType RunErrandsBusinessType { get; set; }
        /// <summary>
        /// 无忧搬家套餐Id
        /// </summary>
        [Display(Name = "无忧搬家套餐Id")]
        public int? WorryFreeMoveSuiteConfigId { get; set; }
        /// <summary>
        /// 便捷搬家套餐Id
        /// </summary>
        [Display(Name = "便捷搬家套餐Id")]
        public int? EasyMoveSuiteConfigId { get; set; }
        /// <summary>
        /// 有搬运服务（无忧搬家默认开启，便捷搬家只有开启才计算）
        /// </summary>
        [Display(Name = "有搬运服务")]
        public bool HasCarryService { get; set; }
        /// <summary>
        /// 大件货物数量
        /// </summary>
        [Display(Name ="便捷搬家、同城业务时，大件货物数量决定特殊服务价格")]
        public int? BigGoodsCount { get; set; }
        /// <summary>
        /// 无忧搬家规格服务列表
        /// </summary>
        [Display(Name = "无忧搬家规格服务列表")]
        public List<WorryFreeMoveSpecificationServiceRequestDto> MoveSpecificationServices { get; set; }
        /// <summary>
        /// 特殊服务清单
        /// </summary>
        [Display(Name = "特殊服务清单")]
        public List<OrderSpecificServiceRequestDto> SpecificService { get; set; }
        /// <summary>
        /// 收货地地址列表
        /// </summary>
        [Display(Name = "收货地地址列表")]
        public List<OrderShippingCostAddressRequestDto> ConsigneeAddress { get; set; }
        /// <summary>
        /// 货物清单
        /// </summary>
        [Display(Name = "货物清单")]
        public List<OrderShippingCostGoodsRequestDto> GoodsChecklist { get; set; }
        /// <summary>
        /// 包装材料列表
        /// </summary>
        [Display(Name = "包装材料列表")]
        public List<PackingConfigViewDto> Packings { get; set; }


    }
}
